// 引入Mock
// mock语法查看官网
const Mock = require('mockjs')
const Random = Mock.Random
const productNewsData = function () {
  let articles = []
  for (let i = 0; i < 10; i++) {
    let newArticleObject = {
      name: Random.cname(),
      date: Random.date() + '' + Random.time()
    }
    articles.push(newArticleObject)
  }
  return {
    articles: articles
  }
}
Mock.mock('/api', /post|get/, productNewsData)
